<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0,user-scalable=no">
	   	<title>我的关注</title>
	    <link href="/static/weike/css/style.css" rel="stylesheet">
	    <script src="/static/js/jquery.js"></script>
	    <script src="/static/weike/js/style.js"></script>

	    <script>
	    	function follow(ele){
	    		var a=Number(ele.checked);//a==1时为正常的关注状态，为0为取消
	    	}
	    </script>
	</head>
	<body class="weike_follow">
		<article>
		{volist name="teacher" id="vo"}
		<section >
				<article onclick="javascript:window.location.href='http://mg.bonayiyou.com/index/home/person_zhibo.html?user_id={$vo.user_id}'">
					<div>
						<img src="{$vo.headpic}" />
					</div>
					<article>
						<p>{$vo.nickname}</p>
						<p>{$vo.introduce}</p>
					</article>
				</article>
				<aside>
					<input type="checkbox" onclick="follow(this)" checked="checked" onclick="follow(this)" name="{$vo.user_id}" />	
					<div></div>
				</aside>
			</section>
		{/volist}	
		</article>
		<script type="text/javascript">
		function follow(obj)
		{
			var data={};
            data['teacher_id']=$(obj).attr('name');
            data['user_id']   ="{$user_id}";
			if(obj.checked)
			{
               url="http://mg.bonayiyou.com/index/home/add_follow";
               $.post(url,data,function(e){},"JSON");
			}
			else
			{
   
               url="http://mg.bonayiyou.com/index/home/del_follow";
               $.post(url,data,function(e){},"JSON");   
			}
		}
		    	function _bank(ele){
	    		var e =event||window.event;
	    		if(e.target.tagName.toUpperCase() != "INPUT" ){
	    			window.location.href=ele.value;
	    		}
	    	}
		</script>
	</body>
</html>
